package org.example.demo09;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class Test {
    public static void main(String[] args) throws IOException {
        File f=new File("C:/out/1.txt");
        if(!f.exists()){
            f.createNewFile();
        }
        FileWriter pw=new FileWriter(f);
        for(int i=0;i<1000;i++){
            String line="第"+i+"行，我是中国人！\n";
            pw.write(line);
        }
        pw.close();
    }
}
